import Vue from 'vue'
import Router from 'vue-router'
import vueResource from 'vue-resource'
import students from '@/components/student/students'
import newstudent from '@/components/student/newstudent'
import msg from '@/components/msg/msg'
import newmsg from '@/components/msg/newmsg'
import edit from '@/components/student/edit'
import newstudents from '@/components/student/newstudents'
import history from '@/components/history/history'
Vue.use(vueResource)
Vue.use(Router)
Vue.http.options.emulateJSON = true;

export default new Router({
  linkActiveClass: 'active',
  routes: [{
      path: '/',
      redirect:'/students'
    },
    {
      path: '/students',
      name: 'students',
      component: students
    }, {
      path: '/newstudent',
      name: 'newstudent',
      component: newstudent
    }, {
      path: '/msg',
      name: 'msg',
      component: msg
    }, {
      path: '/newmsg',
      name: 'newmsg',
      component: newmsg
    }, {
      path: '/edit/:id',
      name: 'edit',
      component: edit
    },{
      path: '/newstudents',
      name: 'newstudents',
      component: newstudents
    },
    {
      path:'/studenthistory',
      name:'history',
      component:history
    }
  ]
})
